bitkeeper revision 1.1578 (429831b4aG5GnPML1pSzeV9PiOlFAA)
authorarun.sharma@intel.com[kaf24] <arun.sharma@intel.com[kaf24]>
Sat, 28 May 2005 08:54:12 +0000 (08:54 +0000)
committerarun.sharma@intel.com[kaf24] <arun.sharma@intel.com[kaf24]>
Sat, 28 May 2005 08:54:12 +0000 (08:54 +0000)
[PATCH] vmx-smsw.patch

Handle vmexits from the SMSW instruction correctly.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
xen/arch/x86/vmx.c

index 3c649b1a7ac5335d1e68f70bb8ed887e648c63e5..eaa73de5a40b73b148e0b6021570f199b4696c15 100644 (file)
@@ -986,10 +986,9 @@ static int vmx_cr_access(unsigned long exit_qualification, struct cpu_user_regs
         __vmwrite(CR0_READ_SHADOW, value);
         break;
     case TYPE_LMSW:
-        __vmwrite(CR0_READ_SHADOW, value);
+        __vmread(CR0_READ_SHADOW, &value);
        value = (value & ~0xF) |
-               (((exit_qualification & LMSW_SOURCE_DATA) >> 16) & 0xF) |
-               1 /* CR0.PE == 1 */;
+               (((exit_qualification & LMSW_SOURCE_DATA) >> 16) & 0xF);
        return vmx_set_cr0(value);
         break;
     default: